﻿#region Library
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ConnectDatabase;
using System.Configuration;
using SmsControl;
using GSM.BusinessLayer.DataLayer;
using GSM.BusinessLayer;
#endregion

namespace CRM_SMS_MARKETING
{
    class BLL_ReceivingAndReplyMessage
    {
        #region Method
        public void Add_New_Message_To_DB(List<SMS> listNewMessage)
        {
            try
            {
                Message_ConsultFactory message_ConsultFactory = new Message_ConsultFactory();
                Message_Consult buffer;
                foreach (SMS i in listNewMessage)
                {
                    buffer = new Message_Consult();

                    buffer.Content = i.Content;
                    buffer.Phone = i.Number;
                    buffer.Date = i.Date;
                    buffer.Replied = false;
                    buffer.Type = 1;

                    message_ConsultFactory.Insert(buffer);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public void Reply_Consult_Request()
        {
            Message_Consult a = new Message_Consult();
            
        }
        #endregion
    }
}
